package com.example.perplonews.a_a_activity

import BaseActivity
import android.app.usage.UsageEvents
import android.content.Intent
import android.os.Build
import android.util.EventLog
import com.example.perplonews.MainActivity
import com.example.perplonews.R
import com.example.perplonews.a_a_mvp.model.models.TokenModel
import com.example.perplonews.a_a_mvp.presenter.presenters.TokenPresenter
import java.util.jar.Manifest

class SplashActivity : BaseActivity<TokenPresenter>(),Tokencontract.Token_MyView {
    override fun findlayout(): Int {
        return R.layout.activity_main
    }


    override fun initView() {
        if (Build.VERSION.SDK_INT>= Build.VERSION_CODES.M){
            requestPermissions(arrayOf(android.Manifest.permission.READ_PHONE_STATE),100)
        }
    }

    override fun initData() {
        mypre = TokenPresenter(TokenModel(),this)
        mypre.requestToken()
        startActivity(Intent(this,MainActivity::class.java))

        finish()
    }

    override fun refresh() {

    }


}